package com.ag.bean;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * TbKKkey entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "TB_K_KKEY", schema = "dbo", catalog = "AGDB")
public class TbKKkey implements java.io.Serializable {

	// Fields

	private TbKKkeyId id;
	private TbKnowledgeKey tbKnowledgeKey;
	private TbKnowledge tbKnowledge;
	private String a;
	private String b;
	private String c;

	// Constructors

	/** default constructor */
	public TbKKkey() {
	}

	/** minimal constructor */
	public TbKKkey(TbKKkeyId id, TbKnowledgeKey tbKnowledgeKey,
			TbKnowledge tbKnowledge) {
		this.id = id;
		this.tbKnowledgeKey = tbKnowledgeKey;
		this.tbKnowledge = tbKnowledge;
	}

	/** full constructor */
	public TbKKkey(TbKKkeyId id, TbKnowledgeKey tbKnowledgeKey,
			TbKnowledge tbKnowledge, String a, String b, String c) {
		this.id = id;
		this.tbKnowledgeKey = tbKnowledgeKey;
		this.tbKnowledge = tbKnowledge;
		this.a = a;
		this.b = b;
		this.c = c;
	}

	// Property accessors
	@EmbeddedId
	@AttributeOverrides( {
			@AttributeOverride(name = "kkId", column = @Column(name = "KK_ID", nullable = false, length = 10)),
			@AttributeOverride(name = "KId", column = @Column(name = "K_ID", nullable = false, length = 10)) })
	public TbKKkeyId getId() {
		return this.id;
	}

	public void setId(TbKKkeyId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "KK_ID", nullable = false, insertable = false, updatable = false)
	public TbKnowledgeKey getTbKnowledgeKey() {
		return this.tbKnowledgeKey;
	}

	public void setTbKnowledgeKey(TbKnowledgeKey tbKnowledgeKey) {
		this.tbKnowledgeKey = tbKnowledgeKey;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "K_ID", nullable = false, insertable = false, updatable = false)
	public TbKnowledge getTbKnowledge() {
		return this.tbKnowledge;
	}

	public void setTbKnowledge(TbKnowledge tbKnowledge) {
		this.tbKnowledge = tbKnowledge;
	}

	@Column(name = "A", length = 50)
	public String getA() {
		return this.a;
	}

	public void setA(String a) {
		this.a = a;
	}

	@Column(name = "B", length = 50)
	public String getB() {
		return this.b;
	}

	public void setB(String b) {
		this.b = b;
	}

	@Column(name = "C", length = 50)
	public String getC() {
		return this.c;
	}

	public void setC(String c) {
		this.c = c;
	}

}